define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'user.user_bank/index',
        // add_url: 'user.user_bank/add',
        edit_url: 'user.user_bank/edit',
        delete_url: 'user.user_bank/delete',
        export_url: 'user.user_bank/export',
        modify_url: 'user.user_bank/modify',
    };

    var Controller = {

        index: function () {
            ea.table.render({
                init: init,
                cols: [[
                    {type: 'checkbox'},
                    {field: 'id', title: '主键id'},
                    {field: 'uid', title: '用户'},
                    {field: 'credit_card_numbers', title: '银行卡号'},
                    {field: 'identity_card', title: '身份证'},
                    {field: 'phone', title: '手机号'},
                    {field: 'name', title: '用户真实姓名'},
                    {field: 'bank_company', title: '银行公司'},
                    {field: 'bank_name', title: '银行卡名称'},
                    {field: 'bank_type', title: '银行卡类型'},
                    {field: 'create_time', title: '添加时间'},
                    {width: 100, title: '操作', templet: ea.table.tool},

                ]],
            });

            ea.listen();
        },
        add: function () {
            ea.listen();
        },
        edit: function () {
            ea.listen();
        },
    };
    return Controller;
});